import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:ichinesereader/exam/placement/PlaceStepThreeQuestion.dart';

import 'PlaceController.dart';
import 'PlaceStepThreeTopic.dart';

class PlaceStepThreeSection extends GetView<PlaceController> {
  const PlaceStepThreeSection({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Column(
      crossAxisAlignment: CrossAxisAlignment.start,
      children: [
        GetX<PlaceController>(
          init: controller,
          builder: (_) {
            return PlaceStepThreeTopic(
              questionStepTopic: controller.currentQuestionStepTopic.value,
            );
          },
        ),
        _getDivider(),
        GetX<PlaceController>(
            init: controller,
            builder: (_) {
              return PlaceStepThreeQuestion(
                  questionStepBody: controller.currentQuestionStepBody.value);
            }),
      ],
    );
  }

  Widget _getDivider() {
    return Container(
        padding: const EdgeInsets.only(top: 10, bottom: 10),
        child: const Divider(
          height: 2,
          color: Colors.grey,
        ));
  }
}
